package xssys;

public class Student{
    public String name;
    public double income;
    public double tax;
    public double aftax;
    Shiyanshi[] room;
    Student(String a,Shiyanshi rm[]){
        name=a;
        room=rm;
    }
    void payoff1(){
        for(int i=0;i<18;i++){
            if (room[0].rank[i]=="优秀"){
                income += 200;
            }
            if (room[0].rank[i]=="良好"){
                income += 150;
            }
            if (room[0].rank[i]=="及格") {
                income += 100;
            }
        }
    }
    void payoff2(){
        for(int i=0;i<18;i++){
            if (room[0].rank[i]=="优秀"){
                income += 200;
            }
            if (room[0].rank[i]=="良好"){
                income += 150;
            }
            if (room[0].rank[i]=="及格") {
                income += 100;
            }
            if (room[1].rank[i]=="优秀"){
                income += 200;
            }
            if (room[1].rank[i]=="良好"){
                income += 150;
            }
            if (room[1].rank[i]=="及格") {
                income += 100;
            }
        }
    }
    void payoff3(){
        for(int i=0;i<18;i++){
            if (room[0].rank[i]=="优秀"){
                income += 200;
            }
            if (room[0].rank[i]=="良好"){
                income += 150;
            }
            if (room[0].rank[i]=="及格") {
                income += 100;
            }
            if (room[1].rank[i]=="优秀"){
                income += 200;
            }
            if (room[1].rank[i]=="良好"){
                income += 150;
            }
            if (room[1].rank[i]=="及格") {
                income += 100;
            }
            if (room[2].rank[i]=="优秀"){
                income += 200;
            }
            if (room[2].rank[i]=="良好"){
                income += 150;
            }
            if (room[2].rank[i]=="及格") {
                income += 100;
            }
        }
    }
}
